



#ifndef _PDF_FONT_DESCRIPTION_H_
#define _PDF_FONT_DESCRIPTION_H_

#include <wx/string.h>

#include "wx/pdfdocdef.h"

/// Class representing a font description.
class WXDLLIMPEXP_PDFDOC wxPdfFontDescription
{
public:
  /// Default constructor
  wxPdfFontDescription();
  
  /// Constructor
  
  wxPdfFontDescription(int ascent, int descent, int capHeight, int flags,
                       const wxString& fontBBox, int italicAngle, int stemV,
                       int missingWidth, int xHeight,
                       int underlinePosition, int underlineThickness,
                       int hheaAscender = 0, int hheaDescender = 0, int hheaLineGap = 0,
                       int os2sTypoAscender = 0, int os2sTypoDescender = 0, int os2sTypoLineGap = 0,
                       int os2usWinAscent = 0, int os2usWinDescent = 0);

  /// Copy constructor
  wxPdfFontDescription(const wxPdfFontDescription& desc);
  
  /// Default destructor
  ~wxPdfFontDescription();

  /// Set ascender
  
  void SetAscent(int ascent) { m_ascent = ascent; };

  /// Get ascender
  
  int  GetAscent() const { return m_ascent; };
  
  /// Set descender
  
  void SetDescent(int descent) { m_descent = descent;};

  /// Get descender
  
  int  GetDescent() const { return m_descent;};
  
  /// Set CapHeight
  
  void SetCapHeight(int capHeight) { m_capHeight = capHeight; };

  /// Get CapHeight
  
  int  GetCapHeight() const { return m_capHeight; };
  
  /// Set font flags
  
  void SetFlags(int flags) { m_flags = flags; };

  /// Get font flags
  
  int  GetFlags() const { return m_flags; };
  
  /// Set font bounding box
  
  void SetFontBBox(const wxString& fontBBox) { m_fontBBox = fontBBox; };

  /// Get font bounding box
  
  wxString GetFontBBox() const { return m_fontBBox; };
  
  /// Set italic angle
  
  void SetItalicAngle(int italicAngle) { m_italicAngle = italicAngle; };

  /// Get italic angle
  
  int  GetItalicAngle() const { return m_italicAngle; };
  
  /// Set StemV
  
  void SetStemV(int stemV) { m_stemV = stemV; };

  /// Get StemV
  
  int  GetStemV() const { return m_stemV; };

  /// Set missing character width
  
  void SetMissingWidth(int missingWidth) { m_missingWidth = missingWidth; };

  /// Get missing character width
  
  int  GetMissingWidth() const { return m_missingWidth; };
  
  /// Set xHeight
  
  void SetXHeight(int xHeight) { m_xHeight = xHeight; };

  /// Get xHeight
  
  int  GetXHeight() const { return m_xHeight; };
  
  /// Set underline position
  
  void SetUnderlinePosition(int underlinePosition) { m_underlinePosition = underlinePosition; };

  /// Get underline position
  
  int  GetUnderlinePosition() const { return m_underlinePosition; };
  
  /// Set underline thickness
  
  void SetUnderlineThickness(int underlineThickness) { m_underlineThickness = underlineThickness; };

  /// Get underline thickness
  
  int  GetUnderlineThickness() const { return m_underlineThickness; };

  /// Set OpenType Font Metrics
  
  void SetOpenTypeMetrics(int hheaAscender, int hheaDescender, int hheaLineGap,
                          int os2sTypoAscender, int os2sTypoDescender, int os2sTypoLineGap,
                          int os2usWinAscent, int os2usWinDescent);

  /// Get OpenType Font Metrics
  
  void GetOpenTypeMetrics(int* hheaAscender, int* hheaDescender, int* hheaLineGap,
                          int* os2sTypoAscender, int* os2sTypoDescender, int* os2sTypoLineGap,
                          int* os2usWinAscent, int* os2usWinDescent);

private:
  int      m_ascent;                  ///< Ascender
  int      m_descent;                 ///< Descender
  int      m_capHeight;               ///< CapHeight
  int      m_flags;                   ///< Font flags
  wxString m_fontBBox;                ///< Font bounding box
  int      m_italicAngle;             ///< Angle for italics
  int      m_stemV;                   ///< StemV
  int      m_missingWidth;            ///< Missing character width
  int      m_xHeight;                 ///< xHeight
  int      m_underlinePosition;       ///< Underline position
  int      m_underlineThickness;      
  int      m_hheaAscender;            ///< hhea table Ascender
  int      m_hheaDescender;           ///< hhea table Descender
  int      m_hheaLineGap;             ///< hhea table LineGap
  int      m_os2sTypoAscender;        ///< OS/2 table sTypoAscender
  int      m_os2sTypoDescender;       ///< OS/2 table sTypoDescender
  int      m_os2sTypoLineGap;         ///< OS/2 table sTypoLineGap
  int      m_os2usWinAscent;          ///< OS/2 table usWinAscent
  int      m_os2usWinDescent;         ///< OS/2 table usWinDescent
};

#endif
